#ifndef WIN32WINDOW_GUARD
#define WIN32WINDOW_GUARD

#include <windows.h>
#include "Window.h"
#include <string>
#include "common.h"


class Win32Window: public Window
{
public:

	Win32Window():hInstance(GetModuleHandle(NULL)),classname("Win32WindowClassName"){}
	
	void init(std::string title, int width, int height)//, bool fullscreen)
	{
		WNDCLASSEX wc={ sizeof(WNDCLASSEX), CS_CLASSDC, WndProc/*DefWindowProc*/, 0, 0, hInstance, NULL, NULL ,NULL, NULL, classname.c_str(), NULL };
		RegisterClassEx(&wc);
		hWnd=CreateWindow(classname.c_str(), title.c_str(), WS_OVERLAPPED | WS_SYSMENU , 100, 100, 640, 480, GetDesktopWindow(), NULL, hInstance, NULL);
		hDC=GetDC(hWnd);
	}
	void show()
	{
		ShowWindow(hWnd,SW_SHOW);						// Show The Window
		//UpdateWindow(hWnd);
		//SetForegroundWindow(hWnd);						// Slightly Higher Priority
		//SetFocus(hWnd);
	}
	HDC getHDC(){return hDC;}
	HWND getHWND(){return hWnd;}
	HINSTANCE getInstance(){return hInstance;}
	void setRender(){}
	Render* getRender(){return 0;}

	~Win32Window()
	{
		UnregisterClass(classname.c_str(),hInstance);
	}
private:

	HDC			hDC;	
	HWND		hWnd;		
	HINSTANCE	hInstance;
	std::string classname;
	//bool fullscreenflag;

};

#endif